package com.example.kotlintest.extends


fun main() {

//  允许s为null
    var s1:String?=null
    var s=s1
    if(s!=null){
        println(s.toString())
        println(s.length)
    }
    s?:""
    s?.let {
        print(it.length)
    }






    var person = Boy("AA",12);
//    student?.age=10;
//    student?.name="haha";
    var student=person as Boy
    student.add()
    println(student.toString())

    student.test(false,"")
    Boy.staticMethod()
    Boy.address;

}
